FROM golang:1.18

LABEL maintainer="xuping <361131953@qq.com>"

WORKDIR /wave_service_server
COPY . .

RUN go env -w GO111MODULE=on \
    && go env -w GOPROXY=https://goproxy.cn,direct \
    && go mod tidy

WORKDIR /wave_service_server/app

RUN echo 'status=docker' > .env

RUN go build -o server app.go

EXPOSE 8182
EXPOSE 9182

CMD ["./server"]